package com.idTech;

import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.monster.EntityBlaze;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSourceIndirect;
import net.minecraft.util.Icon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;

public class BombEntity extends EntityThrowable
{
	private double explosionRadius = 1;
	
   public BombEntity(World par1World)
   {
       super(par1World);
   }
   public BombEntity(World par1World, EntityLiving par2EntityLiving)
   {
       super(par1World, par2EntityLiving);
   }
   public BombEntity(World par1World, double par2, double par4, double par6)
   {
       super(par1World, par2, par4, par6);
   }
   
   @Override
   protected void onImpact(MovingObjectPosition par1Movingobjectposition)
   {
	   this.setDead();

	   this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)this.explosionRadius, true);
	   
	   if (par1Movingobjectposition.entityHit != null)
       {
           byte b0 = 5;

           
	   par1Movingobjectposition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0);
       
       }
   }
   
   

}